package com.huawei.esdk.tp.cxf.enumgen;

public class ParticipantTypeMapping
{
    public final static int SITE = 0;
    
    public final static int UPPER_LEVEL_PARTICIPANT = 1;
    
    public final static int LOWER_LEVEL_PARTICIPANT = 2;
    
    public final static int CGW = 3;
    
    public final static int VSD = 4;
    
    public static Integer enum2Int(ParticipantType type)
    {
        if (null == type)
        {
            return null;
        }
        switch (type)
        {
            case SITE:
            {
                return SITE;
            }
            case UPPER_LEVEL_PARTICIPANT:
            {
                return UPPER_LEVEL_PARTICIPANT;
            }
            case LOWER_LEVEL_PARTICIPANT:
            {
                return LOWER_LEVEL_PARTICIPANT;
            }
            case CGW:
            {
                return CGW;
            }
            case VSD:
            {
                return VSD;
            }
            default:
            {
                return null;
            }
        }
    }
    
    public static ParticipantType int2Enum(Integer num)
    {
        if (null == num)
        {
            return null;
        }
        switch (num)
        {
            case SITE:
            {
                return ParticipantType.SITE;
            }
            case UPPER_LEVEL_PARTICIPANT:
            {
                return ParticipantType.UPPER_LEVEL_PARTICIPANT;
            }
            case LOWER_LEVEL_PARTICIPANT:
            {
                return ParticipantType.LOWER_LEVEL_PARTICIPANT;
            }
            case CGW:
            {
                return ParticipantType.CGW;
            }
            case VSD:
            {
                return ParticipantType.VSD;
            }
            default:
            {
                return null;
            }
        }
    }
    
    public static Integer string2Int(String type)
    {
        return enum2Int(ParticipantType.valueOf(type));
    }
}
